package com.ethink.mdm.facade.impl;

import com.ethink.mdm.api.LegalCurrencyExchangeRateFacade;
import com.ethink.mdm.api.info.LegalCurrencyExchangeRateInfo;
import com.ethink.mdm.api.request.LegalCurrencyExchangeRateListByPubDatesRequest;
import com.ethink.mdm.api.response.LegalCurrencyExchangeRateGetSummaryResponse;
import com.ethink.mdm.api.response.LegalCurrencyExchangeRateListByPubDatesResponse;
import com.ethink.mdm.service.LegalCurrencyExchangeRateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 法币汇率表 Facade接口实现
 *
 * @Author: lzy
 * @Date: Created in 2022/12/8 14:40
 * ModifiedBy:
 * Version:
 */
@RestController
@Slf4j
@RequestMapping("mdm-service/facade/v1/legalCurrencyExchangeRate")
public class LegalCurrencyExchangeRateFacadeImpl implements LegalCurrencyExchangeRateFacade {
    @Autowired
    private LegalCurrencyExchangeRateService legalCurrencyExchangeRateService;

    @Override
    public LegalCurrencyExchangeRateGetSummaryResponse getLegalCurrencyExchangeRateSummary() {
        return legalCurrencyExchangeRateService.getLegalCurrencyExchangeRateSummary();
    }

    @Override
    public List<LegalCurrencyExchangeRateListByPubDatesResponse> listLegalCurrencyExchangeRateByPubDates(LegalCurrencyExchangeRateListByPubDatesRequest request) {
        return legalCurrencyExchangeRateService.listLegalCurrencyExchangeRateByPubDates(request);
    }
}
